import { createApp } from 'vue'
import Router from './router'
import Store from './store'
import App from './App.vue'
import mitt from 'mitt'
import VXETable from 'vxe-table'
import './styles/index.css'
import 'vxe-table/lib/style.css'

// @ts-ignore
import JsonEditorVue from 'json-editor-vue3';
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'

import WujieVue from 'wujie-vue3'
import {queryParams} from "./untils/tip";

const {setupApp, preloadApp, bus} = WujieVue

function useTable (app: any) {
  app.use(VXETable)
}

const Mit = mitt()

const Vue = createApp(App)

// ȫ������ ��ȡmitt���е�����
declare module 'vue' {
  export interface ComponentCustomProperties {
    $Bus: typeof Mit
  }
}
//ȫ�ֹ���
Vue.config.globalProperties.$Bus = Mit
Vue.use(useTable)
Vue.use(ElementPlus)
Vue.use(Store)
Vue.use(JsonEditorVue)
Vue.use(Router)
Vue.use(WujieVue)
Vue.mount('#app');




setupApp({
    name: 'generator',
    url: '//localhost:3010/',
    exec: true,
    // props,
    alive: true
});

/** 预加载(空闲时才会加载)  */
 preloadApp({
        name: 'generator',
        url: '//localhost:3010/',
        // props: {
        //     data: queryParams()
        // }
    })